package hotciv.variants;

import hotciv.common.GameImpl;
import hotciv.framework.Game;
import hotciv.framework.Player;
import hotciv.framework.WinnerStrategy;

public class ZetaWinner implements WinnerStrategy
{
	private WinnerStrategy currentWin;
	private WinnerStrategy cityWin;
	private WinnerStrategy combatWin;
	
	public ZetaWinner()
	{
		cityWin = new BetaWinner();
		combatWin = new EpsilonWinner();
	}
	public Player getWinner( Game game )
	{
		GameImpl gamez = (GameImpl) game;
		int totalRounds = gamez.getRoundCount();
		
		if (totalRounds == 20) gamez.resetPlayerWins();
		
		if (totalRounds >= 20)
			currentWin = combatWin;
		else
			currentWin = cityWin;
		
		
		return currentWin.getWinner(gamez);
	}

}
